<%--
 *  File:    ProdEditFrm.jsp
 *  @Author: Langerwang 
 *  Date:    2001/01/14
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.OvalLabel" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.ProdEditFrm");  
  String privilegeCode = "10203,L203";
  String strModuleName = "PCM";
%>



<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>
<%
Integer oProdId=(Integer)session.getAttribute("prodid");
String strProdId="";
if(oProdId!=null)
{
  
  strProdId=oProdId.toString();
}
else if(request.getParameter("prodid")!=null)
{
  strProdId=request.getParameter("prodid");
}
session.removeAttribute("prodid");

String oOrderByColumn=(String)session.getAttribute("orderbycolumn"); 
//if(oOrderByColumn!=null)
//{
  session.removeAttribute("orderbycolumn");
//}
//else
 if(request.getParameter("orderbycolumn")!=null)
{
  oOrderByColumn=request.getParameter("orderbycolumn");
}
String strOrderByType=(String)session.getAttribute("orderbytype"); 
//if(strOrderByType!=null)
//{
  session.removeAttribute("orderbytype");
//}
//else
 if(request.getParameter("orderbytype")!=null)
{
  strOrderByType=request.getParameter("orderbytype");
}

Integer oJumpPage=(Integer)session.getAttribute("theendindex");
String strJumpPage="";
if(oJumpPage!=null)
{
  
  strJumpPage=oJumpPage.toString();
}
else if(request.getParameter("theendindex")!=null)
{
  strJumpPage=request.getParameter("theendindex");
}
session.removeAttribute("theendindex");
if(strJumpPage==null || strJumpPage.trim().length()==0)
{
  if(session.getAttribute("jumppage")!=null)
  {
    strJumpPage=""+(((Integer)session.getAttribute("jumppage")).intValue()-1);
    session.removeAttribute("jumppage");
  }
}

//
Integer ocategoryid=(Integer)session.getAttribute("categoryid");
String strcategoryid="";
if(ocategoryid!=null)
{
 
  strcategoryid=ocategoryid.toString();
}
else if(request.getParameter("categoryid")!=null)
{
  strcategoryid=request.getParameter("categoryid");
}
 session.removeAttribute("categoryid");
Integer ocategoryorgid=(Integer)session.getAttribute("categoryorgid");
String strcategoryorgid="";
if(ocategoryorgid!=null)
{
 
  strcategoryorgid=ocategoryorgid.toString();
}
else if(request.getParameter("categoryorgid")!=null)
{
  strcategoryorgid=request.getParameter("categoryorgid");
}
 session.removeAttribute("categoryorgid");
Integer oorgid=(Integer)session.getAttribute("orgid");
String strorgid="";
if(oorgid!=null)
{
  
  strorgid=oorgid.toString();
}
else if(request.getParameter("orgid")!=null)
{
  strorgid=request.getParameter("orgid");
}
session.removeAttribute("orgid");

String strsearchname=(String)session.getAttribute("searchname"); 
//if(strsearchname!=null)
//{
  session.removeAttribute("searchname");
//}
//else
 if(request.getParameter("searchname")!=null)
{
  strsearchname=request.getParameter("searchname");
}
//
String strsearchvalue=(String)session.getAttribute("searchvalue"); 
//if(strsearchvalue!=null)
//{
  session.removeAttribute("searchvalue");
//}
//else 
if(request.getParameter("searchvalue")!=null)
{
  strsearchvalue=request.getParameter("searchvalue");
}

String strselectopt=(String)session.getAttribute("selectopt"); 
//if(strselectopt!=null)
//{
  session.removeAttribute("selectopt");
//}
//else 
if(request.getParameter("selectopt")!=null)
{
  strselectopt=request.getParameter("selectopt");
}


String strParam="&languagecode="+ strLanguageCode;
if(strJumpPage!=null && !strJumpPage.equals(""))
  strParam=strParam+"&theendindex="+strJumpPage;
if(strOrderByType!=null && !strOrderByType.equals(""))
  strParam=strParam+"&orderbytype="+strOrderByType;
if(oOrderByColumn!=null && !oOrderByColumn.equals(""))
  strParam=strParam+"&orderbycolumn="+oOrderByColumn;

if(strselectopt!=null && !strselectopt.equals(""))
  strParam=strParam+"&selectopt="+strselectopt;
if(strcategoryid!=null && !strcategoryid.equals(""))
  strParam=strParam+"&categoryid="+strcategoryid;
if(strcategoryorgid!=null && !strcategoryorgid.equals(""))
  strParam=strParam+"&categoryorgid="+strcategoryorgid;
if(strorgid!=null && !strorgid.equals(""))
  strParam=strParam+"&orgid="+strorgid;
if(strsearchname!=null && !strsearchname.equals(""))
  strParam=strParam+"&searchname="+strsearchname;
if(strsearchvalue!=null && !strsearchvalue.equals(""))
  strParam=strParam+"&searchvalue="+java.net.URLEncoder.encode(strsearchvalue);
  
String stdnew = (String)session.getAttribute("stdnew");
if(stdnew == null) stdnew = "";
if(stdnew.equalsIgnoreCase("Y"))
{  
  strParam=strParam+"&stdnew="+stdnew;
}
%>
<html>
<head>
<title>ProdEditFrm</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<frameset rows="1,*" frameborder="YES" border="0" framespacing="0" cols="*" bordercolor="#999999" name="frmset"> 
 <frame name="up" src="ProdEdit.jsp?<%= OvalTools.randomURL() %>&prodid=<%=JspHelper.filterNull( strProdId )%><%=JspHelper.filterNull(strParam)%><%=JspHelper.filterNull((request.getParameter("isnew")==null)?"":("&isnew="+request.getParameter("isnew")))%>" frameborder="NO" scrolling="NO">
  <frame name="down" scrolling="NO" frameborder="NO" noresize >
</frameset>
<noframes> 
<body>
</body>
</noframes> 
</html>


